from django.contrib import admin

from models import Feed, ArcadeCategory, Game, DownloadQueue

class FeedAdmin(admin.ModelAdmin):
    list_display = ('__unicode__', 'feed_location')

class GameAdmin(admin.ModelAdmin):
    save_on_top = True
    search_fields = ['name', 'slug', 'description']
    date_hierarchy = 'created'
    list_display = ('__unicode__', 'short_description', 'downloaded', 'featured', 'feed_approval_created')
    list_filter = ('queued', 'featured', 'leaderboard_enabled', 'downloaded')

class DownloadQueueAdmin(admin.ModelAdmin):
    save_on_top = True
    search_fields = ['game.name','game.slug','game.description']
    date_hierarchy = 'created'
    list_display = ('__unicode__', 'short_description', 'downloaded', 'featured', 'feed_approval_created')

admin.site.register(Feed, FeedAdmin)
admin.site.register(ArcadeCategory)
admin.site.register(Game, GameAdmin)
admin.site.register(DownloadQueue, DownloadQueueAdmin)